<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
    <title>Donxon SDK Docs</title>
    <link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

<div id="container">

<div id="product">
	<div id="product_logo"></div>
	<div id="product_name"><big><b></b></big></div>
	<div id="product_description"></div>
</div> <!-- id="product" -->


<div id="main">


<!-- Menu -->

<div id="navigation">
<br/>
<h1>Donxon SDK</h1>

<ul>
  <li><a href="../index.html">Index</a></li>
</ul>

<h2>Contents</h2>
<ul>
<li><a href="#Functions">Functions</a></li>
<li><a href="#Math_Library">Math Library </a></li>
<li><a href="#String_Library">String Library </a></li>
<li><a href="#Table_Library">Table Library </a></li>
</ul>


<h2>Globals</h2>
<ul class="nowrap">
  <li><a href="../globals/Properties.html">Properties</a></li>
  <li><strong>Functions</strong></li>
  <li><a href="../globals/Classes.html">Classes</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
  <li><a href="../modules/System.html">System</a></li>
  <li><a href="../modules/Common.html">Common</a></li>
  <li><a href="../modules/Game.html">Game</a></li>
  <li><a href="../modules/UI.html">UI</a></li>
</ul>
<h2>Classes</h2>
<ul class="nowrap">
  <li><a href="../classes/Debug.html">Debug</a></li>
  <li><a href="../classes/StringBuffer.html">StringBuffer</a></li>
  <li><a href="../classes/Hook.html">Hook</a></li>
  <li><a href="../classes/System.UTF8.html">System.UTF8</a></li>
  <li><a href="../classes/Common.Color.html">Common.Color</a></li>
  <li><a href="../classes/Common.Vector2D.html">Common.Vector2D</a></li>
  <li><a href="../classes/Common.Vector.html">Common.Vector</a></li>
  <li><a href="../classes/Common.NetMessage.html">Common.NetMessage</a></li>
  <li><a href="../classes/Common.TextMenu.html">Common.TextMenu</a></li>
  <li><a href="../classes/Common.ScreenFade.html">Common.ScreenFade</a></li>
  <li><a href="../classes/Common.HUDText.html">Common.HUDText</a></li>
  <li><a href="../classes/Game.NetMessage.html">Game.NetMessage</a></li>
  <li><a href="../classes/Game.TextMenu.html">Game.TextMenu</a></li>
  <li><a href="../classes/Game.ScreenFade.html">Game.ScreenFade</a></li>
  <li><a href="../classes/Game.BarTime.html">Game.BarTime</a></li>
  <li><a href="../classes/UI.Rectangle.html">UI.Rectangle</a></li>
  <li><a href="../classes/UI.ProgressBar.html">UI.ProgressBar</a></li>
  <li><a href="../classes/UI.TextMenu.html">UI.TextMenu</a></li>
  <li><a href="../classes/UI.ScreenFade.html">UI.ScreenFade</a></li>
  <li><a href="../classes/UI.BarTime.html">UI.BarTime</a></li>
</ul>
<h2>Topics</h2>
<ul class="">
  <li><a href="../topics/changelog.md.html">changelog</a></li>
  <li><a href="../topics/credit.md.html">credit</a></li>
  <li><a href="../topics/license.html">license</a></li>
</ul>
<h2>Examples</h2>
<ul class="nowrap">
  <li><a href="../examples/bartime.game.lua.html">bartime.game.lua</a></li>
  <li><a href="../examples/bartime.ui.lua.html">bartime.ui.lua</a></li>
  <li><a href="../examples/deltatiming.game.lua.html">deltatiming.game.lua</a></li>
  <li><a href="../examples/deltatiming.ui.lua.html">deltatiming.ui.lua</a></li>
  <li><a href="../examples/hook.game.lua.html">hook.game.lua</a></li>
  <li><a href="../examples/netmsg.simple.common.lua.html">netmsg.simple.common.lua</a></li>
  <li><a href="../examples/netmsg.simple.game.lua.html">netmsg.simple.game.lua</a></li>
  <li><a href="../examples/netmsg.simple.ui.lua.html">netmsg.simple.ui.lua</a></li>
  <li><a href="../examples/progressbar.ui.lua.html">progressbar.ui.lua</a></li>
  <li><a href="../examples/rectangle.ui.lua.html">rectangle.ui.lua</a></li>
  <li><a href="../examples/screenfade.game.lua.html">screenfade.game.lua</a></li>
  <li><a href="../examples/screenfade.ui.lua.html">screenfade.ui.lua</a></li>
  <li><a href="../examples/stringbuffer.lua.html">stringbuffer.lua</a></li>
  <li><a href="../examples/textmenu.simple.game.lua.html">textmenu.simple.game.lua</a></li>
  <li><a href="../examples/utf8.lua.html">utf8.lua</a></li>
  <li><a href="../examples/vector.2d.lua.html">vector.2d.lua</a></li>
  <li><a href="../examples/vector.3d.lua.html">vector.3d.lua</a></li>
</ul>

</div>

<div id="content">

<h1>Global <code>Functions</code></h1>
<p>Donxon Global Functions.</p>
<p> Functions that are accessible at a global level.</p>


<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
	<tr>
	<td class="name" nowrap><a href="#IsGameModule">IsGameModule ()</a></td>
	<td class="summary">Checks whether <a href="../modules/Game.html#">Game</a> module is loaded.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#IsUIModule">IsUIModule ()</a></td>
	<td class="summary">Checks whether <a href="../modules/UI.html#">UI</a> module is loaded.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#AssertType">AssertType (name, datatype, value[, level[, condition[, hop]]])</a></td>
	<td class="summary">Asserts based on value's data type.</td>
	</tr>
</table>
<h2><a href="#Math_Library">Math Library </a></h2>
<table class="function_list">
	<tr>
	<td class="name" nowrap><a href="#math.clamp">math.clamp (min, max, value)</a></td>
	<td class="summary">Clamps a number between a minimum and maximum value.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#math.round">math.round (num[, numDecimalPlaces=0])</a></td>
	<td class="summary">Rounds the number.</td>
	</tr>
</table>
<h2><a href="#String_Library">String Library </a></h2>
<table class="function_list">
	<tr>
	<td class="name" nowrap><a href="#string.explode">string.explode (source, delimiter)</a></td>
	<td class="summary">Splits a string into a <a href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a>.</td>
	</tr>
</table>
<h2><a href="#Table_Library">Table Library </a></h2>
<table class="function_list">
	<tr>
	<td class="name" nowrap><a href="#.extendedTable">.extendedTable</a></td>
	<td class="summary">The extended table.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#.extendedMetatable">.extendedMetatable</a></td>
	<td class="summary">The extended table's metatable.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#table.readonly">table.readonly (table[, msg])</a></td>
	<td class="summary">Sets the <a href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a> access to read-only using <code>metatable</code>.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#table.extend">table.extend (base, derived[, hasWriteOnlyMember[, functionSelfOverride]])</a></td>
	<td class="summary">Extends a <a href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a> using <code>metatable</code>.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#table.merge">table.merge (target, source[, deep=false])</a></td>
	<td class="summary">Merges two tables.</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#table.clone">table.clone (source[, deep=true[, seen=nil]])</a></td>
	<td class="summary">Clones a table.</td>
	</tr>
</table>

<br/>
<br/>


    <h2 class="section-header "><a name="Functions"></a>Functions</h2>

    <dl class="function">
    <dt>
    <a name = "IsGameModule"></a>
    <strong>IsGameModule ()</strong>
    </dt>
    <dd>
    Checks whether <a href="../modules/Game.html#">Game</a> module is loaded.



    <h3>Returns:</h3>
    <ol>

           <span class="types"><span class="type">bool</span></span>
        Returns true if Game module is loaded.
    </ol>




</dd>
    <dt>
    <a name = "IsUIModule"></a>
    <strong>IsUIModule ()</strong>
    </dt>
    <dd>
    Checks whether <a href="../modules/UI.html#">UI</a> module is loaded.



    <h3>Returns:</h3>
    <ol>

           <span class="types"><span class="type">bool</span></span>
        Returns true if UI module is loaded.
    </ol>




</dd>
    <dt>
    <a name = "AssertType"></a>
    <strong>AssertType (name, datatype, value[, level[, condition[, hop]]])</strong>
    </dt>
    <dd>
    Asserts based on value's data type.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">name</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
         The value's variable name.
        </li>
        <li><span class="parameter">datatype</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
         The expected data type.
        </li>
        <li><span class="parameter">value</span>
            <span class="types"><span class="type">anything</span></span>
         The value to checks.
        </li>
        <li><span class="parameter">level</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
         The value's level (property, class, function, etc).
         (<em>optional</em>)
        </li>
        <li><span class="parameter">condition</span>
            <span class="types"><span class="type">bool</span></span>
         The condition to be satisfied.
         (<em>optional</em>)
        </li>
        <li><span class="parameter">hop</span>
            <span class="types"><span class="type">number</span></span>
         Uses <a href="https://www.lua.org/manual/5.1/manual.html#pdf-error">error</a> instead and this is error level hopping number.
         (<em>optional</em>)
        </li>
    </ul>





</dd>
</dl>
    <h2 class="section-header "><a name="Math_Library"></a>Math Library </h2>

    <dl class="function">
    <dt>
    <a name = "math.clamp"></a>
    <strong>math.clamp (min, max, value)</strong>
    </dt>
    <dd>
    Clamps a number between a minimum and maximum value.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">min</span>
            <span class="types"><span class="type">number</span></span>
         The minimum value, this function will never return a number less than this.
        </li>
        <li><span class="parameter">max</span>
            <span class="types"><span class="type">number</span></span>
         The maximum value, this function will never return a number greater than this.
        </li>
        <li><span class="parameter">value</span>
            <span class="types"><span class="type">number</span></span>
         The number to clamp.
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><span class="type">number</span></span>
        The clamped value.
    </ol>




</dd>
    <dt>
    <a name = "math.round"></a>
    <strong>math.round (num[, numDecimalPlaces=0])</strong>
    </dt>
    <dd>
    Rounds the number.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">num</span>
            <span class="types"><span class="type">number</span></span>
         The value to round.
        </li>
        <li><span class="parameter">numDecimalPlaces</span>
            <span class="types"><span class="type">number</span></span>
         The number of decimal place(s).
         (<em>default</em> 0)
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><span class="type">number</span></span>
        The rounded number.
    </ol>




</dd>
</dl>
    <h2 class="section-header "><a name="String_Library"></a>String Library </h2>

    <dl class="function">
    <dt>
    <a name = "string.explode"></a>
    <strong>string.explode (source, delimiter)</strong>
    </dt>
    <dd>
    Splits a string into a <a href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a>.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">source</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
         The string to explode.
        </li>
        <li><span class="parameter">delimiter</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
         The string delimiter.
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
        The result.
    </ol>




</dd>
</dl>
    <h2 class="section-header "><a name="Table_Library"></a>Table Library </h2>

    <dl class="function">
    <dt>
    <a name = ".extendedTable"></a>
    <strong>.extendedTable</strong>
    </dt>
    <dd>
    The extended table.


    <ul>
        <li><span class="parameter">_base</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
         The base table.
        </li>
        <li><span class="parameter">_parent</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
         The parent table inheret from. It could be same as <code>_base</code>.
        </li>
        <li><span class="parameter">...</span>
         The derived table's members.
        </li>
    </ul>





</dd>
    <dt>
    <a name = ".extendedMetatable"></a>
    <strong>.extendedMetatable</strong>
    </dt>
    <dd>
    The extended table's metatable.


    <ul>
        <li><span class="parameter">__hasWriteOnlyMember</span>
            <span class="types"><span class="type">bool</span></span>
         This table has write-only member(s).
         (<em>default</em> false)
        </li>
        <li><span class="parameter">__functionSelfOverride</span>
            <span class="types"><span class="type">bool</span></span>
         Sets derived table as <code>self</code> when accessing base's functions.
         (<em>default</em> false)
        </li>
        <li><span class="parameter">__index_old</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a>, <span class="type">function</span> or <span class="type">nil</span></span>
         The original __index.
        </li>
        <li><span class="parameter">__index</span>
            <span class="types"><span class="type">function</span></span>
         The extended __index.
        </li>
        <li><span class="parameter">__newindex_old</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a>, <span class="type">function</span> or <span class="type">nil</span></span>
         The original __newindex.
        </li>
        <li><span class="parameter">__newindex</span>
            <span class="types"><span class="type">function</span></span>
         The extended __newindex.
        </li>
    </ul>





</dd>
    <dt>
    <a name = "table.readonly"></a>
    <strong>table.readonly (table[, msg])</strong>
    </dt>
    <dd>
    Sets the <a href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a> access to read-only using <code>metatable</code>.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">table</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
         The table to set.
        </li>
        <li><span class="parameter">msg</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.4">string</a></span>
         The error message when invokes table editing.
         (<em>optional</em>)
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
        The result.
    </ol>




</dd>
    <dt>
    <a name = "table.extend"></a>
    <strong>table.extend (base, derived[, hasWriteOnlyMember[, functionSelfOverride]])</strong>
    </dt>
    <dd>
    Extends a <a href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a> using <code>metatable</code>.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">base</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
         The base index table.
        </li>
        <li><span class="parameter">derived</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
         The derived table.
        </li>
        <li><span class="parameter">hasWriteOnlyMember</span>
            <span class="types"><span class="type">bool</span></span>
         Base table has write-only members.
         (<em>optional</em>)
        </li>
        <li><span class="parameter">functionSelfOverride</span>
            <span class="types"><span class="type">bool</span></span>
         Sets derived table as <code>self</code> when accessing base or parent's functions.
         (<em>optional</em>)
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><a class="type" href="../globals/Functions.html#.extendedTable">.extendedTable</a></span>
        The extended derived table.
    </ol>




</dd>
    <dt>
    <a name = "table.merge"></a>
    <strong>table.merge (target, source[, deep=false])</strong>
    </dt>
    <dd>
    Merges two tables.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">target</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
         The target table to merge with.
        </li>
        <li><span class="parameter">source</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
         The source table.
        </li>
        <li><span class="parameter">deep</span>
            <span class="types"><span class="type">bool</span></span>
         Do recursive merge.
         (<em>default</em> false)
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
        The merget target table.
    </ol>




</dd>
    <dt>
    <a name = "table.clone"></a>
    <strong>table.clone (source[, deep=true[, seen=nil]])</strong>
    </dt>
    <dd>
    Clones a table.


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">source</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
         The source table to clone.
        </li>
        <li><span class="parameter">deep</span>
            <span class="types"><span class="type">bool</span></span>
         Do recursive copy.
         (<em>default</em> true)
        </li>
        <li><span class="parameter">seen</span>
            <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
         Last seen sub-table.
         (<em>default</em> nil)
        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

           <span class="types"><a class="type" href="https://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
        The cloned table.
    </ol>




</dd>
</dl>


</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2020-06-15 21:15:36 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>
